<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>长度单位换算</title>
    <style>
        main{
            width: 900px;
            margin: 50px auto;
            text-align: center;
        }
        h1{
            font-size: 1.2rem;
        }
        
    </style>
</head>
<body>
    <main>
        <h1>长度单位换算</h1>
        <form action="">
            <input type="text" placeholder="请输入数值">
            <select name="" id="length-unit1">
                <optgroup label="公制">
                    <option value="100000">千米(km)</option>
                    <option value="100">米(m)</option>
                    <option value="10">分米(dm)</option>
                    <option value="1">厘米(cm)</option>
                </optgroup>
            </select>
            <select name="" id="length-unit2">
                <optgroup label="全部">
                    <option value="100000">千米(km)</option>
                    <option value="100">米(m)</option>
                    <option value="10">分米(dm)</option>
                    <option value="1">厘米(cm)</option>
                </optgroup>
            </select>
        </form>

        <div id="result"></div>
    </main>

    <script src="calc.js"></script>
</body>
</html>